using System.Collections.Generic;

namespace SharpObjects.Utils
{
    public class Characters
    {
        public const char Tab = (char)9;
        public const char LineFeed = (char)10;
        public const char VerticalTab = (char)11;
        public const char FormFeed = (char)12;
        public const char CarriageReturn = (char)13;
        public const char Space = (char)32;

        public static readonly char[] WhiteSpace;
        public static readonly char[] Punctuation;
        public static readonly char[] NonAlphaNumericAscii;


        static Characters()
        {
            List<char> punct = new List<char>();
            List<char> white = new List<char>();
            List<char> nonalphanum = new List<char>();

            for (char ch = (char)0; ch < (char)128; ch++)
            {
                if (char.IsPunctuation(ch))
                {
                    punct.Add(ch);
                }

                if (char.IsWhiteSpace(ch))
                {
                    white.Add(ch);
                }

                if (!char.IsLetter(ch) && !char.IsNumber(ch))
                {
                    nonalphanum.Add(ch);
                }

            }

            Punctuation = punct.ToArray();
            WhiteSpace = white.ToArray();
            NonAlphaNumericAscii = nonalphanum.ToArray();
        }
    }
}
